import componentText from './componentList/componentText'
import BasicShape from './componentList/Shape/BasicShape'
import BasicHistogram from './componentList/Echarts/BasicHistogram'
import Radar from './componentList/Echarts/Radar'
import Button from './componentList/Shape/Button'
import SampleStyle from './componentList/MultiMedia/SampleStyle'
import Basicline from './componentList/Echarts/Basicline'
import StackedLine from './componentList/Echarts/StackedLine'
import Stackinggraph from './componentList/Echarts/Stackinggraph'
import Diagram from './componentList/Echarts/Diagram'
import BasicBarChart from './componentList/Echarts/BasicBarChart'
import StackedBarChart from './componentList/Echarts/StackedBarChart'
import PolarBarChart from './componentList/Echarts/PolarBarChart'
import BasicAreamap from './componentList/Echarts/BasicAreamap'
import BasicStackingArea from './componentList/Echarts/BasicStackingArea'
import panel from './componentList/Echarts/panel'
import Annular from './componentList/Echarts/Annular'
import Annular2 from './componentList/Echarts/Annular2'
import StackedHistogram from './componentList/Echarts/StackedHistogram'
import MuchAnnular from './componentList/Echarts/MuchAnnular'
import MuchAnnular2 from './componentList/Echarts/MuchAnnular2'
import PercentageBar from './componentList/Echarts/PercentageBar'
import PercentageHistogram from './componentList/Echarts/PercentageHistogram'
import Piechart from './componentList/Echarts/Piechart'
import Piechart2 from './componentList/Echarts/Piechart2'
import Time from "./componentList/General/time";
import Colck from "./componentList/General/colck";
import Tree from "./componentList/General/tree";
import Table from "./componentList/General/table";


// 公共样式

export const commonStyle = {    
    rotate: 0,
    opacity: 1,
    page: 0,
};

export const commonAttr = {
    animations: [],
    events: {},
    groupStyle: {}, // 当一个组件成为 Group 的子组件时使用
    isLock: false, // 是否锁定组件
};

// 编辑器左侧组件列表
const list = [
    ...componentText,
    ...Button,
    ...SampleStyle,
    ...BasicShape,
    ...BasicHistogram,
    ...Basicline,
    ...StackedLine,
    ...Radar,
    ...Diagram,
    ...Stackinggraph,
    ...StackedHistogram,
    ...BasicBarChart,
    ...StackedBarChart,
    ...PolarBarChart,
    ...BasicAreamap,
    ...BasicStackingArea,
    ...panel,
    ...Annular,
    ...Annular2,
    ...MuchAnnular,
    ...MuchAnnular2,
    ...PercentageBar,
    ...PercentageHistogram,
    ...Piechart,
    ...Piechart2,
    ...Time,
    ...Colck,
    ...Tree,
    ...Table,
    
];

for (let i = 0, len = list.length; i < len; i++) {
    const item = list[i];
    item.style = { ...commonStyle, ...item.style };
    list[i] = { ...commonAttr, ...item };
}

export default list;
